// This jar is all we need to call Prolog from Java
import java.io.File;

import jpl.*;

public class ProlMusic {


public static void main( String argv[] ){
	JPL.init();
	File f=new File("src/Motore Inferenziale.pl");
	Term consult_arg[] = { 
	        new Atom(f.getAbsolutePath()) 
	    };
	    Query consult_query = 
	        new Query( 
	            "reconsult", 
	            consult_arg );

	    boolean consulted = consult_query.hasSolution();
	    
	    Query main=new Query("main");
	    
	    main.query();
	    
	    if ( !consulted ){
	        System.err.println( "Consult failed" );
	        System.exit( 1 );
	    }
	}

public String pathBaseConoscenza(){
	File f=new File("src/Base Conoscenza.pl");
	return f.getAbsolutePath();
}
}
